#ifndef GITLMODUAL_H
#define GITLMODUAL_H

#include <QVector>
#include <QString>
#include <QObject>

#include "gitldef.h"
#include "gitlevent.h"

class GitlEventBus;

class GitlModual
{

public:
    GitlModual();
    ~GitlModual();

    /*! The concrete action to deal with specific event
      */
    virtual bool detonate( GitlEvent* pcEvt ) = 0;

    bool listenToEvtByName( const QString& strEvtName );
    bool isListenToEvt( const QString& strEvtName );
    bool dispatchEvt( GitlEvent* pcEvt );



    ADD_CLASS_FIELD( QString, strModualName, getModualName, setModualName )
    ADD_CLASS_FIELD_PRIVATE( QVector<QString>, cListeningEvts )
    ADD_CLASS_FIELD_NOSETTER( GitlEventBus*, pcGitlEvtBus, getGitlEvtBus )


};

#endif // GITLMODUAL_H
